package alp.starcode.nudtportal.user.controller;

import alp.starcode.common.result.Result;
import alp.starcode.nudtportal.framework.aspect.model.CheckSign;
import alp.starcode.nudtportal.framework.model.dto.RequestExceptionDTO;
import alp.starcode.nudtportal.framework.model.dto.UserLoginLogIDTO;
import alp.starcode.nudtportal.framework.model.dto.UserBehaviorDTO;
import alp.starcode.nudtportal.user.service.ProbeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;

/**
 * 服务探针
 *
 * @author junl
 */
@RestController
@RequestMapping("probe")
@Api(tags = "服务探针")
public class ProbeController {
    @Autowired
    ProbeService probeService;


    @GetMapping("survival")
    public Boolean survival() throws Exception {
        return probeService.survival();
    }

    @GetMapping("ready")
    public Boolean ready(HttpServletResponse response) throws Exception {
        return probeService.ready(response);
    }
}
